<?php if (! defined('APPPATH')) die('No direct script access allowed');
/**
 * RENARTI IK
 * An open source application development framework for PHP 5.2.0 or newer
 *
 * @package		RtiFramework
 * @author		Nauris Dambis <nauris.dambis@renarti.com>
 * @copyright	Copyright (c) 2012, RENARTI IK.
 * @license		http://renarti.com/#license
 * @link		http://renarti.com
 * @since		Version 1.0
 */

class RtiProfiler
{
	public function write()
	{
		if ((Rti::config('config')->get('PROFILER') === TRUE) && (ENVIRONMENT !== ENVIRONMENT_PRODUCTION))
		{
			// profilers
			echo "<pre>";	
		    	echo "<h3>benchmark</h3>";
			echo "Controller rendered in " . Rti::benchmark()->get('bm_controller') . " sec.<br/>";
		    	echo "Total render time is " . Rti::benchmark()->get('bm_application') . " sec.";
			
		    	echo "<h3>loadedFiles</h3>";
			print_r(Rti::getLoadedFiles());
			
			echo "<h3>loadedObjects</h3>";
			print_r(Rti::getLoadedObjects());
			
			echo "<h3>loadedVars</h3>";
			print_r(Rti::getLoadedVars());
			
			echo "<h3>Translations</h3>";
			print_r(Rti::getTranslations());
			
			$const = get_defined_constants(TRUE);
			echo "<h3>Constants</h3>";
			print_r($const['user']);
		}
	}
}

/* End of file RtiProfiler.php */
/* Location: ./system/core/RtiProfiler.php */
